package com.otitan.la.forest.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 用户表
 *
 * @author jiacs
 * @email xxx
 * @date 2020-09-15 16:01:53
 */
@Data
@TableName("\"SYS_USER\"")
@ApiModel("用户表实体")
public class UserEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", required = false)
    @TableId("\"ID\"")
    private String id;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称", required = true)
    @NotEmpty(message = "用户名称不能为空")
    @Length(max = 30, message = "用户名称不能超过 30 个字符")
    @TableField("\"USER_NAME\"")
    private String userName;

    /**
     * 邮箱地址
     */
    @ApiModelProperty(value = "邮箱地址", required = false)
    @TableField("\"EMAIL\"")
    private String email;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码", required = false)
    @TableField("\"PASSWORD\"")
    private String password;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", required = false)
    // @Length(max = 50, message = "备注不能超过 50 个字符")
    @TableField("\"REMARKS\"")
    private String remarks;

    /**
     * 备用字段1
     */
    @ApiModelProperty(value = "备用字段1", required = false)
    @TableField("\"COMMON1\"")
    private String common1;

    /**
     * 备用字段2
     */
    @ApiModelProperty(value = "备用字段2", required = false)
    @TableField("\"COMMON2\"")
    private String common2;

    /**
     * 备用字段3
     */
    @ApiModelProperty(value = "备用字段3", required = false)
    @TableField("\"COMMON3\"")
    private String common3;

    /**
     * 出生日期
     */
    @ApiModelProperty(value = "出生日期", required = false)
    @TableField("\"BIRTHDAY\"")
    private Date birthday;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别", required = false)
    @TableField("\"SEX\"")
    private String sex;

    /**
     * 办公电话
     */
    @ApiModelProperty(value = "办公电话", required = false)
    @Length(max = 16, message = "办公电话不能超过 16 个字符")
    @TableField("\"OFFICE_PHONE\"")
    private String officePhone;

    /**
     * 手机
     */
    @ApiModelProperty(value = "手机", required = false)
    @Length(max = 16, message = "手机不能超过 16 个字符")
    @TableField("\"PHONE\"")
    private String phone;

    /**
     * 政治面貌
     */
    @ApiModelProperty(value = "政治面貌", required = false)
    @TableField("\"POLITICAL_LANDSCAPE\"")
    private String politicalLandscape;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像", required = false)
    @TableField("\"USER_ICON\"")
    private String userIcon;

    /**
     * 是否护林员
     */
    @ApiModelProperty(value = "是否护林员", required = false)
    @TableField("\"IS_RANGER\"")
    private Integer isRanger;

    /**
     * 个人评价
     */
    @ApiModelProperty(value = "个人评价", required = false)
    @Length(max = 160, message = "个人评价不能超过 160 个字符")
    @TableField("\"ASSESSMENT\"")
    private String assessment;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除", required = false)
    @TableField(value = "\"IS_DELETE\"", fill = FieldFill.INSERT)
    @TableLogic  //逻辑删除注解
    @JsonIgnore  //忽略
    private Integer isDelete;

    /**
     * 创建用户
     */
    @ApiModelProperty(value = "创建用户", required = false)
    @TableField(value = "\"CREATE_USER\"", fill = FieldFill.INSERT)
    private String createUser;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", required = false)
    @TableField(value = "\"CREATE_DATE\"", fill = FieldFill.INSERT)
    private Date createDate;

    /**
     * 编辑用户
     */
    @ApiModelProperty(value = "编辑用户", required = false)
    @TableField(value = "\"UPDATE_USER\"", fill = FieldFill.INSERT_UPDATE)
    private String updateUser;

    /**
     * 编辑时间
     */
    @ApiModelProperty(value = "编辑时间", required = false)
    @TableField(value = "\"UPDATE_DATE\"", fill = FieldFill.INSERT_UPDATE)
    private Date updateDate;

    /**
     * 监控中心
     */
    @ApiModelProperty(value = "监控中心", required = false)
    @TableField("\"MONITORING_CENTER\"")
    private String monitoringCenter;

    /**
     * 真实姓名
     */
    @ApiModelProperty(value = "真实姓名", required = false)
    @Length(max = 10, message = "真实姓名不能超过 10 个字符")
    @TableField("\"REAL_NAME\"")
    private String realName;


}
